package com.hy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hy.domain.Tour;

@Controller
public class NewTourController {
	
	@RequestMapping("/hylv/view/{id}")
	public String view(@PathVariable long id, Model model) {
		Tour tour = Tour.findTour(id);
		model.addAttribute("tour", tour);
		model.addAttribute("up", tour.getUp());
		model.addAttribute("next", tour.getNext());
		return "hylv_xq";
	}
	
}
